#include"progress_bar.h"


void progress_bar()
{
  char bar[SIZE];
  memset(bar,0,sizeof(bar));
  const char* show = "-\\|/";
  for(int i = 0; i < SIZE; i++)
  {
    
    printf("[\033[1;32m%-100s\033[0m][%d%%][%c]\r",bar,i,show[i%4]);
    bar[i] = CH;
    fflush(stdout);
    if(i == 60)
    {
      sleep(10);
    }
    else if(i > 60 && i <= 70)
    {
      sleep(3);
    }
    else
    {
      usleep(50000);
    }
  }
  printf("\n");
}

